#lang racket

(define-struct inventory (name price picture))

(define (find-picture asymbol an-ir-list)
  (cond
    [(empty? an-ir-list) false]
    [else (cond
            [(str-cmp? asymbol (inventory-name (first an-ir-list))) 
             (inventory-picture (first an-ir-list))]
            [else (find-picture asymbol (rest an-ir-list))])])
  )

(define (price-of asymbol an-ir-list)
   (cond
    [(empty? an-ir-list) false]
    [else (cond
            [(str-cmp? asymbol (inventory-name (first an-ir-list))) 
             (inventory-price (first an-ir-list))]
            [else (price-of asymbol (rest an-ir-list))])])
  )

(define (str-cmp? s1 s2)
  (symbol=? s1 s2)
  )

; Test
(define a-list
  (cons (make-inventory 'dollar 1.26 'psl)
     (cons (make-inventory 'robot 2.56 'reboot)
       (cons (make-inventory 'doll 3.14 'feman) empty))))

(find-picture 'dolls a-list)
(price-of 'robot a-list)